package 结构型模型.组合模式;

public interface Component {
    void operstion();
}
//叶子节点
interface Leaf extends Component{

}
//容器组件
interface Composite extends Component{
    void add(Component c);
    void remove(Component c);
    Component getChild(int index);
}
